/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/{{apis}}/dto/{{apiDtos@DEFAULT}}.java.hbs
 */
package cn.ibizlab.api.dto;

import java.util.*;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 认证接口[AuthLoginResponseDTO]
 *
 * @author generator
 */
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel("认证接口DTO")
public class AuthLoginResponseDTO extends DTOBase implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * token类型
     */
    @JsonProperty("token_type")
    @JSONField(name = "token_type")
    @ApiModelProperty(value = "token类型", position = 0)
    private String tokenType;

    /**
     * access_token
     */
    @JsonProperty("access_token")
    @JSONField(name = "access_token")
    @ApiModelProperty(value = "access_token", position = 1)
    private String accessToken;

    /**
     * token
     */
    @JsonProperty("token")
    @JSONField(name = "token")
    @ApiModelProperty(value = "token", position = 2)
    private String token;

    /**
     * 用户信息
     */
    @JsonProperty("user")
    @JSONField(name = "user")
    @ApiModelProperty(value = "用户信息", position = 3)
    private AuthInfoDTO user;

    /**
     * 范围
     */
    @JsonProperty("scope")
    @JSONField(name = "scope")
    @ApiModelProperty(value = "范围", position = 4)
    private String scope;

    /**
     * token_id
     */
    @JsonProperty("token_id")
    @JSONField(name = "token_id")
    @ApiModelProperty(value = "token_id", position = 5)
    private String tokenId;

    /**
     * 过期时间
     */
    @JsonProperty("expiration")
    @JSONField(name = "expiration")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "过期时间", position = 6)
    private Long expiration;

    /**
     * 过期剩余秒数
     */
    @JsonProperty("expires_in")
    @JSONField(name = "expires_in")
    @ApiModelProperty(value = "过期剩余秒数", position = 7)
    private Integer expiresIn;

    /**
     * refresh_token
     */
    @JsonProperty("refresh_token")
    @JSONField(name = "refresh_token")
    @ApiModelProperty(value = "refresh_token", position = 8)
    private String refreshToken;


    /**
     * 设置 [token类型]
     */
    public AuthLoginResponseDTO setTokenType(String tokenType) {
        this.tokenType = tokenType;
        this.modify("token_type", tokenType);
        return this;
    }

    /**
     * 设置 [access_token]
     */
    public AuthLoginResponseDTO setAccessToken(String accessToken) {
        this.accessToken = accessToken;
        this.modify("access_token", accessToken);
        return this;
    }

    /**
     * 设置 [token]
     */
    public AuthLoginResponseDTO setToken(String token) {
        this.token = token;
        this.modify("token", token);
        return this;
    }

    /**
     * 设置 [用户信息]
     */
    public AuthLoginResponseDTO setUser(AuthInfoDTO user) {
        this.user = user;
        this.modify("user", user);
        return this;
    }

    /**
     * 设置 [范围]
     */
    public AuthLoginResponseDTO setScope(String scope) {
        this.scope = scope;
        this.modify("scope", scope);
        return this;
    }

    /**
     * 设置 [token_id]
     */
    public AuthLoginResponseDTO setTokenId(String tokenId) {
        this.tokenId = tokenId;
        this.modify("token_id", tokenId);
        return this;
    }

    /**
     * 设置 [过期时间]
     */
    public AuthLoginResponseDTO setExpiration(Long expiration) {
        this.expiration = expiration;
        this.modify("expiration", expiration);
        return this;
    }

    /**
     * 设置 [过期剩余秒数]
     */
    public AuthLoginResponseDTO setExpiresIn(Integer expiresIn) {
        this.expiresIn = expiresIn;
        this.modify("expires_in", expiresIn);
        return this;
    }

    /**
     * 设置 [refresh_token]
     */
    public AuthLoginResponseDTO setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
        this.modify("refresh_token", refreshToken);
        return this;
    }


}
